package com.ruoyi.common.utils;

import com.alibaba.fastjson2.JSONObject;

public class VajumpTest {


    public static void main(String[] args) {


        String table = "{\n" +
                "  \"upgrade\": [\n" +
                "    \"ALTER TABLE \\\"value_added_order\\\" ADD \\\"order_type\\\" INT NOT NULL  DEFAULT 1\",\n" +
                "    \"ALTER TABLE \\\"value_added_order\\\" ADD \\\"apply_cycle\\\" INT NOT NULL  DEFAULT 1\",\n" +
                "    \"ALTER TABLE \\\"value_added_order\\\" ADD \\\"company_name\\\" VARCHAR(80)\",\n" +
                "    \"ALTER TABLE \\\"value_added_order\\\" ADD \\\"address\\\" VARCHAR(100)\",\n" +
                "    \"CREATE TABLE IF NOT EXISTS \\\"value_added_signingorder\\\" (\\n    \\\"id\\\" UUID NOT NULL  PRIMARY KEY,\\n    \\\"no\\\" VARCHAR(20),\\n    \\\"order_type\\\" VARCHAR(20),\\n    \\\"client\\\" UUID,\\n    \\\"update_time\\\" TIMESTAMP NOT NULL  DEFAULT CURRENT_TIMESTAMP,\\n    \\\"create_time\\\" TIMESTAMP NOT NULL  DEFAULT CURRENT_TIMESTAMP,\\n    \\\"marketer\\\" UUID,\\n    \\\"market_manager\\\" UUID,\\n    \\\"financial_manager\\\" UUID,\\n    \\\"general_manager\\\" UUID,\\n    \\\"c_enterprise_name\\\" VARCHAR(80),\\n    \\\"c_social_code\\\" VARCHAR(80),\\n    \\\"c_corporate\\\" VARCHAR(80),\\n    \\\"c_enterprise_addr\\\" VARCHAR(80),\\n    \\\"c_client_name\\\" VARCHAR(40),\\n    \\\"c_client_phone\\\" VARCHAR(50),\\n    \\\"c_client_addr\\\" VARCHAR(80),\\n    \\\"c_id_no\\\" VARCHAR(20),\\n    \\\"c_marriage\\\" INT NOT NULL  DEFAULT 1,\\n    \\\"c_spouse_name\\\" VARCHAR(40),\\n    \\\"c_spouse_id_no\\\" VARCHAR(20),\\n    \\\"c_house_addr\\\" VARCHAR(80),\\n    \\\"c_house_area\\\" DOUBLE PRECISION,\\n    \\\"c_market_price\\\" DOUBLE PRECISION,\\n    \\\"b_enterprise_name\\\" VARCHAR(80),\\n    \\\"b_social_code\\\" VARCHAR(80),\\n    \\\"b_corporate\\\" VARCHAR(80),\\n    \\\"b_enterprise_addr\\\" VARCHAR(80),\\n    \\\"b_client_name\\\" VARCHAR(40),\\n    \\\"b_client_phone\\\" VARCHAR(50),\\n    \\\"b_client_addr\\\" VARCHAR(80),\\n    \\\"b_id_no\\\" VARCHAR(20),\\n    \\\"b_marriage\\\" INT NOT NULL  DEFAULT 1,\\n    \\\"b_spouse_name\\\" VARCHAR(40),\\n    \\\"b_spouse_id_no\\\" VARCHAR(20),\\n    \\\"b_house_addr\\\" VARCHAR(80),\\n    \\\"b_house_area\\\" DOUBLE PRECISION,\\n    \\\"b_market_price\\\" DOUBLE PRECISION,\\n    \\\"from_bank\\\" VARCHAR(80),\\n    \\\"from_account_name\\\" VARCHAR(40),\\n    \\\"from_account_no\\\" VARCHAR(40),\\n    \\\"from_loan_amount\\\" DOUBLE PRECISION,\\n    \\\"from_time_start\\\" TIMESTAMP,\\n    \\\"from_time_end\\\" TIMESTAMP,\\n    \\\"to_bank\\\" VARCHAR(80),\\n    \\\"to_account_name\\\" VARCHAR(40),\\n    \\\"to_account_no\\\" VARCHAR(40),\\n    \\\"to_loan_amount\\\" DOUBLE PRECISION,\\n    \\\"to_time_start\\\" TIMESTAMP,\\n    \\\"to_time_end\\\" TIMESTAMP,\\n    \\\"mortgage_times\\\" INT   DEFAULT 1,\\n    \\\"intention_price\\\" DOUBLE PRECISION,\\n    \\\"intention_rate\\\" DOUBLE PRECISION,\\n    \\\"intent_time_start\\\" TIMESTAMP,\\n    \\\"intent_time_end\\\" TIMESTAMP,\\n    \\\"intro_name\\\" VARCHAR(40),\\n    \\\"intro_client_name\\\" VARCHAR(40),\\n    \\\"intro_phone\\\" VARCHAR(50),\\n    \\\"intro_income\\\" DOUBLE PRECISION,\\n    \\\"deposit_yuan\\\" DOUBLE PRECISION,\\n    \\\"remark\\\" VARCHAR(512),\\n    \\\"mortgage_info\\\" VARCHAR(1024),\\n    \\\"credit_info\\\" VARCHAR(1024),\\n    \\\"overdue_info\\\" VARCHAR(1024),\\n    \\\"refund_method\\\" VARCHAR(50),\\n    \\\"verify_price\\\" DOUBLE PRECISION,\\n    \\\"verify_rate\\\" DOUBLE PRECISION,\\n    \\\"verify_time_start\\\" TIMESTAMP,\\n    \\\"verify_time_end\\\" TIMESTAMP,\\n    \\\"risk_ctrl_remark\\\" VARCHAR(1024),\\n    \\\"verify_comment\\\" VARCHAR(1024),\\n    \\\"appointment_time\\\" TIMESTAMP,\\n    \\\"appointment_addr\\\" VARCHAR(80),\\n    \\\"appointment_remark\\\" VARCHAR(1024),\\n    \\\"collect_price\\\" DOUBLE PRECISION,\\n    \\\"info_remark\\\" VARCHAR(1024),\\n    \\\"loan_price\\\" DOUBLE PRECISION,\\n    \\\"loan_interest\\\" DOUBLE PRECISION,\\n    \\\"loan_time_start\\\" TIMESTAMP,\\n    \\\"loan_time_end\\\" TIMESTAMP,\\n    \\\"refund_time\\\" TIMESTAMP,\\n    \\\"loan_remark\\\" VARCHAR(1024),\\n    \\\"return_price\\\" DOUBLE PRECISION,\\n    \\\"serving_time\\\" TIMESTAMP,\\n    \\\"finish_time\\\" TIMESTAMP,\\n    \\\"status\\\" INT NOT NULL  DEFAULT 0,\\n    \\\"stage\\\" INT NOT NULL  DEFAULT 1,\\n    \\\"merchant\\\" UUID NOT NULL,\\n    \\\"rate\\\" INT NOT NULL  DEFAULT 0,\\n    \\\"finished\\\" INT NOT NULL  DEFAULT 0,\\n    \\\"comment\\\" VARCHAR(20)\\n);\"\n" +
                "  ],\n" +
                "  \"downgrade\": [\n" +
                "    \"ALTER TABLE \\\"value_added_order\\\" DROP COLUMN \\\"order_type\\\"\",\n" +
                "    \"ALTER TABLE \\\"value_added_order\\\" DROP COLUMN \\\"apply_cycle\\\"\",\n" +
                "    \"ALTER TABLE \\\"value_added_order\\\" DROP COLUMN \\\"company_name\\\"\",\n" +
                "    \"ALTER TABLE \\\"value_added_order\\\" DROP COLUMN \\\"address\\\"\",\n" +
                "    \"DROP TABLE IF EXISTS \\\"value_added_signingorder\\\"\"\n" +
                "  ]\n" +
                "}";

        JSONObject jsonObject = JSONObject.parseObject(table);

        System.out.println(jsonObject.getJSONArray("upgrade").get(4));




    }
}
